import request from '@/config/axios'

export interface ClueTransRuleVO {
	id : number
	accountId : number
	channelId : number
	status : number
	minInterval : number
	transPos : number
	ownerEmptyHandle : number
	pooId : number
}

// 查询转化规则列表
export const getClueTransRulePage = async (params) => {
	return await request.get({ url: `/crm/robot-clue-trans-rule/page`, params })
}

// 查询转化规则详情
export const getClueTransRule = async (id : number) => {
	return await request.get({ url: `/crm/robot-clue-trans-rule/get?id=` + id })
}

// 新增转化规则
export const createClueTransRule = async (data) => {
	return await request.post({ url: `/crm/robot-clue-trans-rule/create`, data })
}

// 修改转化规则
export const updateClueTransRule = async (data) => {
	return await request.put({ url: `/crm/robot-clue-trans-rule/update`, data })
}

// 删除转化规则
export const deleteClueTransRule = async (id : number) => {
	return await request.delete({ url: `/crm/robot-clue-trans-rule/delete?id=` + id })
}

// 导出转化规则 Excel
export const exportClueTransRule = async (params) => {
	return await request.download({ url: `/crm/robot-clue-trans-rule/export-excel`, params })
}